#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n;
ll a[100038]={0};
vector<ll> pos;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){cin>>a[i];}
    sort(a+1,a+1+n);
    for(int i=1;i<=n;i++){if(a[i]!=a[i-1]){pos.push_back(i-1);}}
    int sz=pos.size();
    ll sy=n-pos[sz-1];
    for(int i=sz-1;i>0;i--){sy=max(sy,pos[i]-pos[i-1]);}
    cout<<sy;
    return 0;
}
